package com.lin.linchatgpt.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  实体类。
 *
 * @author 15898
 * @since 2023-06-22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "chat_subject")
public class Subject implements Serializable {

    /**
     * 聊天主题id
     */
    @Id(keyType = KeyType.Generator,value = "myUUID")
    private String id;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 聊天主题
     */
    private String title;

    /**
     * 逻辑删除
     */
    @Column(isLogicDelete = true)
    private Integer isDeleted;

    /**
     * 创建记录时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 最近一次修改记录时间
     */
    @Column(onUpdateValue = "now()")
    private LocalDateTime modifyTime;

}
